#ifndef OBSERVER_H
#define OBSERVER_H

#include <iostream>
#include <vector>
#include <memory>

// 定义Observer接口
class Observer {
public:
    virtual void update(const std::string& message) = 0;
};

// 定义Subject接口
class Subject {
public:
    virtual void registerObserver(Observer* observer) = 0;
    virtual void removeObserver(Observer* observer) = 0;
    virtual void notifyObservers() = 0;
};

#endif // OBSERVER_H